import { createRouter, createWebHashHistory } from 'vue-router'

const Home = () => import('../views/Home.vue')
const About = () => import('../views/About.vue')
const PostDetail = () => import('../views/PostDetail.vue')
const Posts = () => import('../views/Posts.vue')

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    { path: '/', name: 'home', component: Home },
    { path: '/about', name: 'about', component: About },
    { path: '/posts', name: 'posts', component: Posts },
    { path: '/post/:id', name: 'post-detail', component: PostDetail }
  ]
})

export default router
